<script>
export default {
  name: "customDirectives",
//   自定义变量
  data() {
    return {
      col: 'red',
      value: 'green'
    }
  },
  directives: {
    color1(el, format) {
      console.log(el)
      console.log(111)
      console.log(format)
    },
    color2:{
      inserted(el){
        console.log(el)
      }
    }


  }
}
</script>

<template>
<div>directives
<!--  <div v-color="col">2</div>-->
<!--  <div v-color="'green'">3</div>-->

<!--  <input type="text" v-color1>-->

  <input type="text" v-color1 v-model="value">
<!--  <div v-color2>333</div>-->
<!--  <input type="text" v-color2>-->
</div>

</template>

<style scoped lang="less">

</style>